home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_gen_secretareas.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  86 lines

  1. # Jones 3D Cog Script
  2. #
  3. # 00_SECRETAREAS.COG
  4. #
  5. # Maximum of 20 Secret areas, triggered upon entering a marked sector
  6. #
  7. # [IS & YB]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10.  
  11.  
  12. symbols
  13.     sector      secret0                          nolink local
  14.     sector      secret1                          linkid=1
  15.     sector      secret2                          linkid=2
  16.     sector      secret3                          linkid=4
  17.     sector      secret4                          linkid=8
  18.     sector      secret5                          linkid=16
  19.     sector      secret6                          linkid=32
  20.     sector      secret7                          linkid=64
  21.     sector      secret8                          linkid=128
  22.     sector      secret9                          linkid=256
  23.     sector      secret10                         linkid=512
  24.     sector      secret11                         linkid=1024
  25.     sector      secret12                         linkid=2048
  26.     sector      secret13                         linkid=4096
  27.     sector      secret14                         linkid=8192
  28.     sector      secret15                         linkid=16384
  29.     sector      secret16                         linkid=32768
  30.     sector      secret17                         linkid=65536
  31.     sector      secret18                         linkid=131072
  32.     sector      secret19                         linkid=262144
  33.     sector      secret20                         linkid=524288
  34.  
  35.     int         player                           local
  36.     int         maxSecrets=0                     local
  37.     int         flags=0                          local
  38.     int         i=0                              local
  39.  
  40. #    sound            wav0=Activate01.wav                    local
  41.  
  42.     message     startup
  43.     message     entered
  44. end
  45.  
  46. # ========================================================================================
  47.  
  48. code
  49. startup:
  50.    player = GetLocalPlayerThing();
  51.  
  52.    // Total secret areas
  53.    for(i=1; i<=20; i=i+1)
  54.    {
  55.       if(secret0[i] >= 0)
  56.       {
  57.          maxSecrets = maxSecrets + 1;
  58.       }
  59.    }
  60.  
  61.    SetInv(player, 70, 0);              // set Secrets Found
  62.    SetInv(player, 71, maxSecrets);     // set Max Secrets on Level
  63.  
  64.    Return;
  65.  
  66. # ........................................................................................
  67.  
  68. entered:
  69.    // Secret already visited
  70.    if (flags & GetSenderID()) Return;
  71.  
  72.    flags = flags | GetSenderId();
  73.  
  74.     // Add one to secret counter
  75.    ChangeInv(player, 70, 1.0);
  76.  
  77.    //Print("Entered Secret Area.");
  78.    //jkPrintUNIString(player, 360);
  79.  
  80.     // PlaySoundLocal(wav0, 1.0, 0.0, 0x0);
  81.  
  82.    Return;
  83.  
  84. end
  85.  
  86.